package com.kd.rpc.serviceImpl;

import com.alibaba.dubbo.rpc.RpcContext;
import com.kd.rpc.service.Hello;

public class HelloImpl implements Hello {

	public String speak(String s) {
		if(null == s) {
			return "no say";
		}
		return "say " + s;
	}
	
	public void hello() {
		String consumerIp = RpcContext.getContext().getRemoteHost();
		String application = RpcContext.getContext().getUrl().getParameter("application");
		System.out.println("consumer ip: " + consumerIp);
		System.out.println("application: " + application);
	}
}
